#ifndef AVALON_PIPEDMESSAGEREADERWRITERTESTER_HPP
#define AVALON_PIPEDMESSAGEREADERWRITERTESTER_HPP
#include <cppunit/extensions/HelperMacros.h>
#include "Avalon/IO/IO.hpp"
#include "Avalon/IOTests/IOTests.hpp"

namespace Avalon {
namespace IO {
namespace Tests {

  /** \class PipedMessageReaderWriterTester
   *  \brief Tests the PipedMessageReader/Writer classes.
   */
  class PipedMessageReaderWriterTester : public CPPUNIT_NS::TestFixture {
    public:

      //! Tests a single write/read operation.
      void TestSingleWriteSingleRead();

      //! Tests a multiple write/single read operation.
      void TestMultipleWriteSingleRead();

      //! Tests a multiple write/read sequences.
      void TestMultipleWriteRead();

      //! Tests a multiple writes followed by multiple reads.
      void TestMultipleWritesThenMultipleReads();

    private:
      CPPUNIT_TEST_SUITE(PipedMessageReaderWriterTester);
        CPPUNIT_TEST(TestSingleWriteSingleRead);
        CPPUNIT_TEST(TestMultipleWriteSingleRead);
        CPPUNIT_TEST(TestMultipleWriteRead);
        CPPUNIT_TEST(TestMultipleWritesThenMultipleReads);
      CPPUNIT_TEST_SUITE_END();
  };
}
}
}

#endif // AVALON_PIPEDMESSAGEREADERWRITERTESTER_HPP
